﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OneMake.Model
{
    //聚划算款各时段销售
    public class report_jhs_time_sale
    {
        [MapToField(FieldName = "日期")]
        public DateTime stat_datetime { get; set; }

        [MapToField(FieldName = "时段")]
        public string time_interval { get; set; }

        [MapToField(FieldName = "休闲裤")]
        public int xiu_xian_ku_num { get; set; }

        [MapToField(FieldName = "西裤")]
        public int xi_ku_num { get; set; }

        [MapToField(FieldName = "棉服")]
        public int mian_ku_num { get; set; }
    }

    partial class ReportHelper
    {
        public List<report_jhs_time_sale> get_report_jhs_time_sale(int shopid, DateTime day)
        {
            var db = new PetaPoco.Database("mysql" + UserSession.Network);
            string sql = "select stat_datetime,order_title as time_interval,n_prds as xiu_xian_ku_num,n_prds as xi_ku_num, n_prds as mian_ku_num from htjy_d_products where shopid=@0 and stat_datetime=@1";
            return db.Fetch<report_jhs_time_sale>(sql, shopid, day.Date);
        }
    }
}
